import { Button, Result } from "antd";
import { useNavigate } from "react-router-dom";

function Error403() {
  const navigator = useNavigate();
  const handleClick = () => {
    navigator("/");
  };

  return (
    <Result
      status="403"
      title="403"
      subTitle="对不起，您没有权限访问此页面."
      extra={[
        <Button key="primary" onClick={handleClick}>
          返回首页
        </Button>,
      ]}
    />
  );
}

export default Error403;
